import request from '@/utils/request'

// 获取所有岗位
export function fetchLabelList(data) {
	return request({
		url: '/label/list',
		method: 'POST',
		data: data
	})
}

// 获取已设置计价规则的岗位
export function getPriceLabelList(data) {
	return request({
		url: '/label/getPriceLabelList',
		method: 'POST',
		data: data
	})
}

// 获取需求监控详细数据 数字悬浮展开使用
export function fetchMonitorInfo(data) {
	return request({
		url: '/abnormal/listDemandMonitorInfo',
		method: 'POST',
		data: data
	})
}

// 获取店铺监控列表v2
export function fetchMonitorList(data) {
	return request({
		url: '/abnormal/listDemandMonitor_v2',
		method: 'POST',
		data: data
	})
}
// 获取店铺监控列表V3
export function fetchShopDemandMatch(data) {
	return request({
		url: '/abnormal/shopDemandMatch',
		method: 'POST',
		data: data
	})
}
// 获取店铺新增订单
export function fetListForOrder(data) {
	return request({
		url: '/shop/getListForOrder',
		method: 'POST',
		data: data
	})
}
// 获取店铺监控添加记录
export function demandSetRecord(data) {
	return request({
		url: '/abnormal/setRecord',
		method: 'POST',
		data: data
	})
}

// 获取不用工记录
export function fetchReasonList(data) {
	return request({
		url: '/abnormal/getReasonList',
		method: 'POST',
		data: data
	})
}

// 获取推荐的下单
export function fetchRecommendDemand(data) {
	return request({
		url: '/demand/recommend',
		method: 'POST',
		data: data
	})
}

// 批量下单(需求)
export function batchCreateDemand(data) {
	return request({
		url: '/demand/batchCreateDemand',
		method: 'POST',
		data: data
	})
}

// 获取店铺列表
export function fetchShopList(data) {
	return request({
		url: '/shop/getListForSearch',
		method: 'POST',
		data: data
	})
}

// 获取店铺商圈列表
export function fetchAreaList(data) {
	return request({
		url: '/area/list',
		method: 'POST',
		data: data
	})
}

// 暂不用工列表
export function fetchPauseList(data) {
	return request({
		url: '/shop/pause/getList',
		method: 'POST',
		data: data
	})
}

// 创建暂不用工
export function createPauseShop(data) {
	return request({
		url: '/shop/pause/create',
		method: 'POST',
		data: data
	})
}

// 暂不用工详情
export function fetchPauseShopInfo(data) {
	return request({
		url: '/shop/pause/getInfo',
		method: 'POST',
		data: data
	})
}

// 编辑用工详情
export function setPauseShopInfo(data) {
	return request({
		url: '/shop/pause/setInfo',
		method: 'POST',
		data: data
	})
}

// 作废暂不用工
export function batchPauseShop(data) {
	return request({
		url: '/shop/pause/cancel',
		method: 'POST',
		data: data
	})
}

// 任务查询接口
export function queryTaskList(data) {
	return request({
		url: '/task/list',
		method: 'POST',
		data: data
	})
}

// 获取订单列表
export function fetchDemandList(data) {
	return request({
		url: '/demand/list',
		method: 'POST',
		data
	})
}
// 店铺评价列表
export function fetchShopAppraise(data) {
	return request({
		url: '/shopAppraise/getList',
		method: 'POST',
		data
	})
}

//店铺用工频率列表
export function fetchPresetList(data) {
	return request({
		url: '/preset/presetList',
		method: 'POST',
		data
	})
}

//商户列表
export function fetchBusinessList(data) {
	return request({
		url: '/business/list',
		method: 'POST',
		data
	})
}

//商户详情
export function fetchBusinessInfo(data) {
	return request({
		url: '/business/info',
		method: 'POST',
		data
	})
}

//商户账号密码修改
export function setShopUserPwd(data) {
	return request({
		url: '/shopUser/setPassword',
		method: 'POST',
		data
	})
}

//获取店铺详情
export function getShopInfo(data) {
	return request({
		url: '/shop/info',
		method: 'POST',
		data
	})
}

//查询是否有未支付的订单
export function getShopOrder(data) {
	return request({
		url: '/demand/saveVerification',
		method: 'POST',
		data
	})
}

//余额和可透支金额
export function getAccountInfo(data) {
	return request({
		url: '/shop/getAccountInfo',
		method: 'POST',
		data
	})
}

//店铺账户流水列表
export function fetchRecordList(data) {
	return request({
		url: '/shop/recordList',
		method: 'POST',
		data
	})
}

//店铺账户流水列表2
export function fetchRecordList2(data) {
	return request({
		url: '/shop/recordDetailList',
		method: 'POST',
		data
	})
}

//店铺账户充值
export function shopRecharge(data) {
	return request({
		url: '/shop/recharge',
		method: 'POST',
		data
	})
}

export function shopWithdraw(data) {
	return request({
		url: '/shop/withdraw',
		method: 'POST',
		data
	})
}

//店铺透支额度
export function shopSetoverdraft(data) {
	return request({
		url: '/shop/setOverdraft',
		method: 'POST',
		data
	})
}

//获取加价列表
export function getShopPremium(data) {
	return request({
    url: 'prices/shopPrice',
		method: 'POST',
		data
	})
}

//确认调账
export function confirmChange(data) {
	return request({
		url: '/billChange/confirm',
		method: 'POST',
		data
	})
}

//商户订单支付查询
export function fetchOrderTradeList(data) {
	return request({
		url: '/pay/getOrderTradeList',
		method: 'POST',
		data
	})
}

//商户列表 搜索栏专用
export function fetchBusinessForSearchList(data) {
	return request({
		url: '/business/listForSearch',
		method: 'POST',
		data
	})
}

//店铺列表 获取签到码
export function fetchSignCoding(data) {
	return request({
		url: '/shop/signCoding',
		method: 'POST',
		data
	})
}

//店铺列表 获取入职码
export function fetchEntryCoding(data) {
	return request({
		url: '/shop/entryCoding',
		method: 'POST',
		data
	})
}

//管理费列表
export function fetManageFeeList(data) {
  return request({
    url: '/platformFee/getList',
    method: 'POST',
    data
  })
}

// 店铺详情
export function fetchShopInfo(data) {
	return request({
		url: '/shop/info',
		method: 'POST',
		data
	})
}

//新增管理费
export function createFee(data) {
	return request({
		url: '/platformFee/create',
    method: 'POST',
    data
  })
}

// 店铺编辑
export function setShopEdit(data) {
	return request({
		url: '/shop/edit',
		method: 'POST',
		data
	})
}

//编辑管理费
export function editorFee(data) {
	return request({
		url: '/platformFee/setInfo',
    method: 'POST',
    data
  })
}

// 获取发票类目
export function fetchInvoiceList(data) {
	return request({
		url: '/common/invoiceList',
		method: 'POST',
		data
	})
}

//管理费列表更新状态
export function updateStatus(data) {
	return request({
		url: '/platformFee/Operate',
		method: 'POST',
		data
	})
}

// 合同审核
export function contractAuditEdit(data) {
	return request({
		url: '/shop/contractAudit',
    method: 'POST',
    data
  })
}

// 签约信息
export function setContractInfo(data) {
  return request({
    url: '/shop/contractInfo',
    method: 'POST',
    data
  })
}

//  -------------- 单店加价相关
//单店定价列表
export function fetShopPriceList(data) {
	return request({
		url: '/premiumShop/getList',
    method: 'POST',
    data
  })
}

//单店新增定价
export function addShopPrice(data) {
	return request({
		url: '/premiumShop/create',
		method: 'POST',
		data
	})
}

//更新单店定价状态
export function updateShopPriceStatus(data) {
  return request({
    url: '/premiumShop/disable',
    method: 'POST',
    data
  })
}

//单店价格调整提示列表
export function fetPromptPriceList(data) {
  return request({
    url: '/prices/hintGetPrice',
    method: 'POST',
    data
  })
}

//单店价格更新
export function updatePromptPrice(data) {
	return request({
	  url: '/premiumShop/setInfo',
	  method: 'POST',
	  data
	})
}


// 店铺用工等级列表
export function getShopJobLevelList(data) {
  return request({
    url: '/shopJobLevel/getList',
    method: 'POST',
    data
  })
}

// 批量新增/修改店铺用工等级
export function saveShopJobLevel(data) {
  return request({
    url: '/shopJobLevel/batchSave',
    method: 'POST',
    data
  })
}

// 修改店铺用工等级
export function editShopJobLevel(data) {
  return request({
    url: '/shopJobLevel/setInfo',
    method: 'POST',
    data
  })
}

// 店铺用工等级(3个级别)
export function shopJobRankList(data) {
  return request({
    url: '/shopJobLevel/rankList',
    method: 'POST',
    data
  })
}

// 结算信息 编辑
export function settlementSave(data) {
	return request({
		url: '/shop/settlementInfo',
    method: 'POST',
    data
  })
}

//  -------------- 加价规则相关
//定价列表
export function fetAddPriceList(data) {
	return request({
		url: '/premiums/getList',
		method: 'POST',
		data
	})
}

// 打卡设置 编辑
export function setShopConfigSave(data) {
	return request({
		url: '/shop/shopConfig',
    method: 'POST',
    data
  })
}

//定价添加
export function fetAddPrice(data) {
	return request({
		url: '/premiums/create',
		method: 'POST',
		data
	})
}

// 获取商户列表 搜索的
export function fetchBusinessForSearch(data) {
	return request({
		url: '/business/listForSearch',
    method: 'POST',
    data
  })
}

//更新定价状态
export function updatePriceStatus(data) {
	return request({
		url: '/premiums/disable',
		method: 'POST',
		data
	})
}

//获取商务负责人列表
export function fetchBusinessUser(data) {
	return request({
		url: '/manageUser/getBusinessUser',
		method: 'POST',
		data
	})
}

//编辑店铺 基本信息
export function setAddBasicEdit(data) {
	return request({
		url: '/shop/addBasic',
		method: 'POST',
		data
	})
}
//编辑店铺 资质材料
export function setAddQualificationEdit(data) {
	return request({
		url: '/shop/addQualification',
		method: 'POST',
		data
	})
}

// 获取店铺灵活合作可显示的按钮权限-临时方案
export function getShopInfoPerm(data) {
	return request({
		url: '/shop/getShopInfoPerm',
		method: 'POST',
		data
	})
}

// 获取店铺所有账号
export function getShopUserList(data) {
	return request({
		url: '/shopUser/shopUserList',
		method: 'GET',
		data
	})
}

//删除店铺账号
export function shopDelShopUser(data) {
	return request({
		url: '/shopUser/delShopUser',
		method: 'POST',
		data
	})
}



// WEBPACK FOOTER //
// ./src/api/shop.js